<template>
	<view class="clinical">
		<!-- 发病情况 -->
		<view class="clinical-box">
			<view class="box-header" :style="show1 == true ? '' : 'marginBottom:0'">
				<view class="header-left">
					<view class="left-line"></view>
					<text>发病情况</text>
					<text style="color: red;margin-left: 10rpx;">*</text>
				</view>
				<view>
					<u-icon :name="show1 ? 'arrow-up' : 'arrow-down'" bold @click="show1 = !show1"></u-icon>
				</view>
			</view>
			<u-transition show>
				<view v-show="show1">
					<view class="box-form">
						<view class="form-left">
							本次是:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.morbidityCondition" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="初诊"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="复诊"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<view class="right-input-box" style=" margin-top: 20rpx;">第(
								<view class="input-box-style">
									<u--input border="none" inputAlign="center" fontSize="22rpx" type="number"
										:disabled="form.morbidityCondition=== 0" v-model="form.timesNum"
										size="mini"></u--input>
								</view>)次
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							发病时间:
						</view>
						<view class="form-right">
							<uni-datetime-picker type="date" :value="form.morbidityTime" start="1990-01-01"
								:end="currentTime" @change="changeTime" />
						</view>
					</view>
				</view>
			</u-transition>
		</view>

		<!-- 发热情况 -->
		<view class="clinical-box">
			<view class="box-header" :style="show2 == true ? '' : 'marginBottom:0'">
				<view class="header-left">
					<view class="left-line"></view>
					<text>发热情况 </text>
					<text style="color: red;margin-left: 10rpx;">*</text>
				</view>
				<view>
					<u-icon :name="show2 ? 'arrow-up' : 'arrow-down'" bold @click="show2 = !show2"></u-icon>
				</view>
			</view>
			<u-transition show>
				<view v-show="show2">
					<view class="box-form">
						<view class="form-left">
							发热:
						</view>
						<view class="form-right"
							style="display: flex;align-items: center;justify-content: space-between;">
							<view class="right-input-box">
								第
								<view class="input-box-style">
									<u--input @blur="change1" border="none" inputAlign="center" fontSize="22rpx" type="number"
										v-model="form.feverDayNum" size="mini"></u--input>
								</view>
								天
							</view>
							<view class="right-input-box">
								最高
								<view class="input-box-style">
									<u--input @blur="change2" border="none" inputAlign="center" fontSize="22rpx"
										v-model="form.highTemperature" type="digit" size="mini"></u--input>
								</view>
								℃
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							发热相关症状:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.feverSymptom" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<u-checkbox-group v-model="form.symptomDetailArr" :disabled="form.feverSymptom === 0"
								placement="row" style="margin-top: 20rpx;">
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="有寒战" name="有寒战"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="手足凉" name="手足凉"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="精神差" name="精神差"></u-checkbox>
							</u-checkbox-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							发热时间间隔:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.feverTimeInterval" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="持续发热"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="间隔发热"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<view class="right-input-box" style=" margin-top: 20rpx;">
								<view class="input-box-style">
									<u--input  @blur="change3" border="none" inputAlign="center" fontSize="22rpx"
										:disabled="form.feverTimeInterval=== 0" v-model="form.intervalTimeHour"  type="number"
										size="mini"></u--input>
								</view>小时
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							发热用药:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.feverMedicateStatus" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<view class="right-input-box" style=" margin-top: 20rpx;">
								<view class="input-box-style" style="width: 100%;">
									<u--input border="none" fontSize="22rpx" placeholder="如有请输入"
										:disabled="form.feverMedicateStatus=== 0" v-model="form.medicateDetail"
										size="mini"></u--input>
								</view>
							</view>
						</view>
					</view>

				</view>
			</u-transition>
		</view>
		<!-- 咳嗽情况 -->
		<view class="clinical-box">
			<view class="box-header" :style="show3 == true ? '' : 'marginBottom:0'">
				<view class="header-left">
					<view class="left-line"></view>
					<text>咳嗽情况 </text>
					<text style="color: red;margin-left: 10rpx;">*</text>
				</view>
				<view>
					<u-icon :name="show3 ? 'arrow-up' : 'arrow-down'" bold @click="show3 = !show3"></u-icon>
				</view>
			</view>

			<u-transition show>
				<view v-show="show3">
					<view class="box-form">
						<view class="form-left">
							咳嗽第几天:
						</view>
						<view class="form-right"
							style="display: flex;align-items: center;justify-content: space-between;">
							<view class="right-input-box">
								第
								<view class="input-box-style">
									<u--input border="none" inputAlign="center" fontSize="22rpx"  type="number"
										v-model="form.coughDayNum" size="mini"></u--input>
								</view>
								天
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							加重:
						</view>
						<view class="form-right"
							style="display: flex;align-items: center;justify-content: space-between;">
							<view class="right-input-box">
								第
								<view class="input-box-style">
									<u--input border="none" inputAlign="center" v-model="form.aggravateDayNum" type="number"
										size="mini"></u--input>
								</view>
								天
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							咳嗽时间:
						</view>
						<view class="form-right">
							<u-checkbox-group v-model="form.coughTimesArr" placement="row">
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="早起" name="早起"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="白天" name="白天"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="晚上" name="晚上"></u-checkbox>
							</u-checkbox-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							咳嗽相关因素:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.coughRelatedFactor" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<u-checkbox-group v-model="form.coughFactorDetailArr"
								:disabled="form.coughRelatedFactor === 0" placement="row" style="margin-top: 20rpx;">
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="运动" name="运动"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="甜咸" name="甜咸"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" style="margin-right: 10rpx;" labelSize="22rpx"
									label="异味" name="异味"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="冷风刺激"
									name="冷风刺激"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" style="margin-right: 10rpx;margin-top: 10rpx;"
									labelSize="22rpx" label="哭笑" name="哭笑"></u-checkbox>
							</u-checkbox-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							咳嗽伴随症状:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.coughVomitStatus">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" style="margin-right: 10rpx;" :name="0"
									label="无呕吐"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有呕吐"></u-radio>
							</u-radio-group>
							<u-radio-group v-model="form.coughAwakeningStatus" style="margin-top: 20rpx;">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" style="margin-right: 10rpx;" :name="0"
									label="无夜里咳醒"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有夜里咳醒"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							发热时有无咳嗽:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.feverCoughStatus" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							咳嗽特点:
						</view>
						<view class="form-right">
							<u-checkbox-group v-model="form.coughPeculiarityArr" placement="row"
								:disabled="form.feverCoughStatus!==1">
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="不详" name="不详"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="干咳" name="干咳"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" style="margin-right: 10rpx;" labelSize="22rpx"
									label="阵咳" name="阵咳"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="痰多" name="痰多"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="痰少" name="痰少"
									style="margin-right: 10rpx;margin-top: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="痰色白" name="痰色白"
									style="margin-right: 10rpx;margin-top: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" style="margin-right: 10rpx;margin-top: 10rpx;"
									labelSize="22rpx" label="痰色黄" name="痰色黄"></u-checkbox>
							</u-checkbox-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							咳嗽录音:
						</view>
						<view class="form-right"
							style="display: flex;justify-content: space-between;align-items: center;">
							<view class="video-btn" @longtap.stop.prevent="startRecord"  @touchmove.stop.prevent="voiceIng" @touchend="voiceEnd">
								<u-icon name="mic" color="#54b6ab" size="30rpx"></u-icon>
							</view>
							
							<view class="media-text" @click="open1('../static/video/luyin.mp4')">录音示例</view>
						</view>
					</view>
					<view class="box-form"  v-for="(item,index) in form.coughRecordedUrlArr" :key="index">
						<view class="form-left">

						</view>
						<view class="form-right" style="display: flex;justify-content: space-between;align-items: center;">
							<!-- <u--text type="info" @tap="playVoice(item)" v-if="form.coughRecordedUrlArr"
								prefixIcon="volume" size="13" decoration="underline"
								v-for="(item,index) in form.coughRecordedUrlArr" :key="index"
								:text="'录音'+(index+1)">
								</u--text> -->
								
								<u-button style="width: 50rpx;" @tap="playVoice(item)" icon="volume" size="mini"  :text="'录音'+(index+1)"></u-button>
								<u-button style="width: 30rpx;"  size="mini" @click="deleteVoice(index)">删除</u-button>
						</view>
					</view>

				</view>
			</u-transition>
			
			
			<!-- 录音UI效果 -->
			<view class="record" :class="recording?'':'hidden'">
				<view class="ing" :class="willStop?'hidden':''">
					<view class="icon luyin2"></view>
				</view>
				<view class="cancel" :class="willStop?'':'hidden'">
					<view class="icon chehui"></view>
				</view>
				<view class="tis" :class="willStop?'change':''">{{recordTis}}</view>
			</view>

		</view>
		<!-- 足跟循环情况 -->
		<view class="clinical-box">
			<view class="box-header" :style="show4 == true ? '' : 'marginBottom:0'">
				<view class="header-left">
					<view class="left-line"></view>
					<text>足跟循环情况 </text>
					<!-- <text style="color: red;margin-left: 10rpx;">*</text> -->
				</view>
				<view>
					<u-icon :name="show4 ? 'arrow-up' : 'arrow-down'" bold @click="show4 = !show4"></u-icon>
				</view>
			</view>
			<u-transition show>
				<view v-show="show4">
					<view class="box-form">
						<view class="form-left">
							上传视频:
						</view>
						<view class="form-right"
							style="display: flex;align-items: flex-start;justify-content: space-between;" @click="open1(form.heelExampleUrlArr.length>0?form.heelExampleUrlArr[0].url:null)">
							<u-upload  :fileList="form.heelExampleUrlArr" @afterRead="afterRead" @delete="deletePic" @oversize="oversize"
								maxSize="50000000" uploadIconColor="#54b6ab" uploadIcon="plus" name="1" :maxCount="1"
								:previewFullImage="true" accept="video"></u-upload>
							<!-- <video v-else :src="form.heelExampleUrl"></video> -->

							<text class="media-text" @click="open1('../static/video/zugen.mp4')">视频示例</text>
						</view>
					</view>

					<view class="box-form">
						<view class="form-left">
							足跟颜色:
						</view>
						<view class="form-right"
							style="display: flex;align-items: flex-start;flex-wrap: wrap; justify-content: space-between;">
							<view class="foot-color" :class="form.heelColor === 1? 'footActive' : ''"
								@click="form.heelColor=1">
								<!-- 足底颜色正常 -->
								<image mode="scaleToFill" src="../static/image/1.jpg" style="width: 100%;height: 100%;">
								</image>
							</view>
							<view class="foot-color" :class="form.heelColor === 2? 'footActive' : ''"
								@click="form.heelColor=2">
								<!-- 足底颜色发暗 -->
								<image mode="scaleToFill" src="../static/image/2.jpg" style="width: 100%;height: 100%;">
								</image>
							</view>
							<view class="foot-color" :class="form.heelColor === 3? 'footActive' : ''"
								@click="form.heelColor=3">
								<!-- 足底颜色苍白 -->
								<image mode="scaleToFill" src="../static/image/3.jpg" style="width: 100%;height: 100%;">
								</image>
							</view>
							<view class="foot-color" :class="form.heelColor === 4? 'footActive' : ''"
								@click="form.heelColor=4">
								<!-- 足底颜色青紫 -->
								<image mode="scaleToFill" src="../static/image/4.jpg" style="width: 100%;height: 100%;">
								</image>
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							足部温度:
						</view>
						<view class="form-right"
							style="display: flex;align-items: flex-start;flex-wrap: wrap; justify-content: space-between;">
							<u-radio-group v-model="form.heelTemperature">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="温"
									style="margin-right: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="2" label="凉"
									style="margin-right: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="3" label="热"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							足跟按压变红:
						</view>
						<view class="form-right"
							style="display: flex;align-items: flex-start;flex-wrap: wrap; justify-content: space-between;">
							<u-radio-group v-model="form.heelPressRedTime">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="≦3秒"
									style="margin-right: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label=">3秒"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							足心软硬度:
						</view>
						<view class="form-right"
							style="display: flex;align-items: flex-start;flex-wrap: wrap; justify-content: space-between;">
							<u-radio-group v-model="form.heelHardness">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="软(唇)"
									style="margin-right: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="2" label="韧(鼻)"
									style="margin-right: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="3" label="硬(额)"></u-radio>
							</u-radio-group>
						</view>
					</view>



				</view>
			</u-transition>
		</view>
		<!-- 喘息等情况 -->
		<view class="clinical-box">
			<view class="box-header" :style="show5 == true ? '' : 'marginBottom:0'">
				<view class="header-left">
					<view class="left-line"></view>
					<text>喘息等情况 </text>
					<!-- <text style="color: red;margin-left: 10rpx;">*</text> -->
				</view>
				<view>
					<u-icon :name="show5 ? 'arrow-up' : 'arrow-down'" bold @click="show5 = !show5"></u-icon>
				</view>
			</view>
			<u-transition show>
				<view v-show="show5">
					<view class="box-form">
						<view class="form-left">
							喘息:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.gaspStatus" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<view class="right-input-box" style=" margin-top: 20rpx;">第
								<view class="input-box-style">
									<u--input border="none" inputAlign="center" fontSize="22rpx"
										:disabled="form.gaspStatus=== 0" v-model="form.gaspDayNum" type="number"
										size="mini"></u--input>
								</view>天
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							喷嚏:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.sneezeStatus" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<view class="right-input-box" style=" margin-top: 20rpx;">第
								<view class="input-box-style">
									<u--input border="none" inputAlign="center" fontSize="22rpx"
										:disabled="form.sneezeStatus=== 0" v-model="form.sneezeDayNum" type="number"
										size="mini"></u--input>
								</view>天
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							鼻塞:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.nasalObstructionStatus" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<view class="right-input-box" style=" margin-top: 20rpx;">第
								<view class="input-box-style">
									<u--input border="none" inputAlign="center" fontSize="22rpx"
										:disabled="form.nasalObstructionStatus === 0" type="number"
										v-model="form.nasalObstructionDayNum" size="mini"></u--input>
								</view>天
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							咽痛:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.anginaStatus" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<view class="right-input-box" style=" margin-top: 20rpx;">第
								<view class="input-box-style">
									<u--input border="none" inputAlign="center" fontSize="22rpx" type="number"
										:disabled="form.anginaStatus === 0" v-model="form.anginaDayNum"
										size="mini"></u--input>
								</view>天
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							暗哑:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.dullStatus" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<u-radio-group v-model="form.dullDegree" :disabled="form.dullStatus === 0"
								style="margin-top: 20rpx;">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="轻"
									style="margin-right: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="2" label="中"
									style="margin-right: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="3" label="重"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							喘息或呼吸<br> 困难视频:
						</view>
						<view class="form-right"
							style="display: flex;align-items: flex-start;justify-content: space-between;" @click="open1(form.gaspBreathVideoUrlArr.length>0?form.gaspBreathVideoUrlArr[0].url:null)">
							<u-upload :fileList="form.gaspBreathVideoUrlArr" @afterRead="afterRead" @delete="deletePic" @oversize="oversize"
								maxSize="50000000" uploadIconColor="#54b6ab" uploadIcon="plus" name="2" :maxCount="1"
								:previewFullImage="true" accept="video"></u-upload>
							<text class="media-text" style="color: #6897ff;"
								@click="open1('../static/video/huxi.mp4')">视频示例</text>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							电子听诊器<br> 上传呼吸音:
						</view>
						<view class="form-right"
							style="display: flex;align-items: stretch;justify-content: space-between;"  @click="open1(form.electronicStethoscopeUrlArr.length>0?form.electronicStethoscopeUrlArr[0].url:null)">
							<u-upload :fileList="form.electronicStethoscopeUrlArr" @afterRead="afterRead" @delete="deletePic" @oversize="oversize"
								maxSize="50000000" uploadIconColor="#54b6ab" uploadIcon="plus" name="4" :maxCount="1"
								:previewFullImage="true" accept="video"></u-upload>
							<view class="text-btn">
								<text @click="open1('../static/video/tingzhenqi.mp4')">呼吸音示例</text>
								<text>电子听诊器使用示例视频</text>
							</view>
						</view>
					</view>



				</view>
			</u-transition>
		</view>
		<!-- 其他相关情况 -->
		<view class="clinical-box">
			<view class="box-header" :style="show6 == true ? '' : 'marginBottom:0'">
				<view class="header-left">
					<view class="left-line"></view>
					<text>其他相关情况 </text>
					<!-- <text style="color: red;margin-left: 10rpx;">*</text> -->
				</view>
				<view>
					<u-icon :name="show6 ? 'arrow-up' : 'arrow-down'" bold @click="show6 = !show6"></u-icon>
				</view>
			</view>
			<u-transition show>
				<view v-show="show6">
					<view class="box-form">
						<view class="form-left">
							手揉鼻子眼睛:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.kneadNoseEye" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							幼时湿疹:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.eczemaStatus" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<u-radio-group v-model="form.eczemaDegree" :disabled="form.eczemaStatus == 0"
								style="margin-top: 20rpx;">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="轻"
									style="margin-right: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="2" label="中"
									style="margin-right: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="3" label="重"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							是否有过敏性鼻炎:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.allergyRhinitis" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							父母过敏性鼻炎:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.parentAllergyRhinitis" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							过敏源:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.allergySource" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<view class="right-input-box" style=" margin-top: 20rpx;">
								<view class="input-box-style" style="width: 100%;">
									<u--input border="none" placeholder="请输入" fontSize="22rpx"
										:disabled="form.allergySource === 0" v-model="form.allergySourceDetail"
										size="mini"></u--input>
								</view>
							</view>
						</view>
					</view>
				</view>
			</u-transition>
		</view>
		<!-- 过敏情况 -->
		<view class="clinical-box">
			<view class="box-header" :style="show7 == true ? '' : 'marginBottom:0'">
				<view class="header-left">
					<view class="left-line"></view>
					<text>过敏情况 </text>
					<!-- <text style="color: red;margin-left: 10rpx;">*</text> -->
				</view>
				<view>
					<u-icon :name="show7 ? 'arrow-up' : 'arrow-down'" bold @click="show7 = !show7"></u-icon>
				</view>
			</view>
			<u-transition show>
				<view v-show="show7">
					<view class="box-form">
						<view class="form-left">
							青霉素/头孢过敏史:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.penicillinCephalosporinAllergy" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							其他过敏药物:
						</view>
						<view class="form-right">
							<view class="right-input-box" style=" margin-top: 20rpx;">
								<view class="input-box-style" style="width: 100%;">
									<u--input border="none" placeholder="可填多项" v-model="form.otherAllergyMedicineDetail"
										fontSize="22rpx" size="mini"></u--input>
								</view>
							</view>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							食物过敏:
						</view>
						<view class="form-right">
							<view class="right-input-box">
								<view class="input-box-style" style="width: 100%;">
									<u--input border="none" placeholder="可填多项" v-model="form.foodAllergyMedicineDetail"
										fontSize="22rpx" size="mini"></u--input>
								</view>
							</view>
						</view>
					</view>
				</view>
			</u-transition>
		</view>
		<!-- 其他疾病情况 -->
		<view class="clinical-box">
			<view class="box-header" :style="show8 == true ? '' : 'marginBottom:0'">
				<view class="header-left">
					<view class="left-line"></view>
					<text>其他疾病情况 </text>
					<!-- <text style="color: red;margin-left: 10rpx;">*</text> -->
				</view>
				<view>
					<u-icon :name="show8 ? 'arrow-up' : 'arrow-down'" bold @click="show8 = !show8"></u-icon>
				</view>
			</view>
			<u-transition show>
				<view v-show="show8">
					<view class="box-form">
						<view class="form-left">
							近两天皮疹:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.recentRash" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
						</view>
					</view>

					<view class="box-form">
						<view class="form-left">
							下面部位皮疹:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.lowerPartRash" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<u-checkbox-group v-model="form.lowerPartRashDetailArr" :disabled="form.lowerPartRash === 0"
								placement="row" style="margin-top: 20rpx;">
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="手" name="手"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="足" name="足"
									style="margin-right: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" style="margin-right: 10rpx;" labelSize="22rpx"
									label="口" name="口"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="肛周" name="肛周"></u-checkbox>
							</u-checkbox-group>
						</view>
					</view>

					<view class="box-form">
						<view class="form-left">
							上传视频/图片:
						</view>
						<view class="form-right"
							style="display: flex;align-items: flex-start;justify-content: space-between;"  @click="open1(form.rashShowUrlArr.length>0?form.rashShowUrlArr[0].url:null)">
							<u-upload :fileList="form.rashShowUrlArr" @afterRead="afterRead" @delete="deletePic"
								uploadIconColor="#54b6ab" uploadIcon="plus" name="3" :maxCount="1"
								accept="video"></u-upload>
						</view>
					</view>
					<view class="box-form">
						<view class="form-left">
							有无下列表现:
						</view>

						<view class="form-right">
							<u-radio-group v-model="form.otherExpression" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="0" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="有"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<u-checkbox-group v-model="form.otherExpressionDetailArr" placement="row"
								:disabled="form.otherExpression===0" style="margin-top: 20rpx;">
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="面部疼痛" name="面部疼痛"
									style="margin-right: 10rpx;margin-bottom: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="胸闷" name="胸闷"
									style="margin-right: 10rpx;margin-bottom: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="咳血" name="咳血"
									style="margin-right: 10rpx;margin-bottom: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="呕吐" name="呕吐"
									style="margin-right: 10rpx;margin-bottom: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="腹痛" name="腹痛"
									style="margin-right: 10rpx;margin-bottom: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="腹泻" name="腹泻"
									style="margin-right: 10rpx;margin-bottom: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="头痛" name="头痛"
									style="margin-right: 10rpx;margin-bottom: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="头晕" name="头晕"
									style="margin-right: 10rpx;margin-bottom: 10rpx;"></u-checkbox>
								<u-checkbox activeColor="#54b6ab" labelSize="22rpx" label="抽搐" name="抽搐"
									style="margin-right: 10rpx;margin-bottom: 10rpx;"></u-checkbox>
							</u-checkbox-group>
						</view>

					</view>
					<view class="box-form">
						<view class="form-left">
							其他疾病:
						</view>
						<view class="form-right">
							<u-radio-group v-model="form.otherIllness" placement="column">
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="1" label="无"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="2" label="血液系统病"
									style="margin-top: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="3" label="传染病"
									style="margin-top: 20rpx;"></u-radio>
								<u-radio activeColor="#54b6ab" labelSize="22rpx" :name="4" label="其他"
									style="margin-top: 20rpx;"></u-radio>
							</u-radio-group>
							<view class="right-input-box" style=" margin-top: 20rpx;">
								<view class="input-box-style" style="width: 100%;">
									<u--input border="none" placeholder="请输入" :disabled="form.otherIllness !== 4"
										fontSize="22rpx" v-model="form.otherIllnessDetail" size="mini"></u--input>
								</view>
							</view>
						</view>
					</view>

				</view>
			</u-transition>
		</view>
		<!-- 组件底部按钮 -->
		<view class="clinical-box" style="background-color: transparent;" v-if="!setId||setId==null">
			<view class="foot-btns">
				<u-button type="primary" text="下一步" color="#54b6ab" @click="nextStep(2)" style="width: 40%;"></u-button>
				<u-button  type="primary" color="#ffb049" text="保存" style="width: 40%;" @click="save"></u-button>
			</view>
		</view>

		<!-- 视频播放 -->
		<u-popup :show="videoShow" @close="videoClose" @open="videoOpen" mode="center">
			<view>
				<video object-fit="contain" id="myVideo" :src="videoUrl" autoplay controls loop></video>
			</view>
		</u-popup>

	</view>
</template>

<script>
	import global from '../common/global.js'
	// #ifndef H5
	// const RECORDER = uni.getRecorderManager()
	// const AUDIO = uni.createInnerAudioContext()
	// #endif
	export default {
		name: "clinical",
		props: ['info', "clientId", "doctorId","setId"],
		data() {
			return {
				recording: false,
				willStop: false,
				recordTis: "手指上滑 取消发送",
				initPoint: {
					identifier: 0,
					Y: 0
				},
				//播放语音相关参数
				AUDIO: uni.createInnerAudioContext(),

				//H5不能录音
				RECORDER: uni.getRecorderManager(),
				
				videoShow: false,
				videoUrl: null,
				show1: true,
				show2: true,
				show3: true,
				show4: true,
				show5: true,
				show6: true,
				show7: true,
				show8: true,
				list: [],
				form: {
					doctorId:null,
					clientId:null,
					morbidityCondition: 0, //发病情况 0初诊 1复诊
					timesNum: null, //复诊次数 初诊不填 复诊必填
					morbidityTime: null, //发病时间 初诊必填 复诊非必填
					feverDayNum: null, //发热天数
					highTemperature: null, //发热最高温度
					feverSymptom: 0, //发热症状 0无 1有
					symptomDetailArr: [], //发热症状详情
					feverTimeInterval: 0, //发热时间间隔 0持续发热 1间隔
					intervalTimeHour: null, //间隔小时
					feverMedicateStatus: 0, //发热用药 0无 1有
					medicateDetail: null, //用药详情
					heelExampleUrlArr: [], //足跟示例资源地址
					heelExampleType: null, //足跟示例资源类型 0图片 1视频
					heelColor: null, //足跟颜色
					heelTemperature: null, //足跟温度 1温 2凉 3热
					heelPressRedTime: null, //足跟按压变红 0 <=3秒  1>3秒
					heelHardness: null, //足心软硬度 1软(唇) 2韧(鼻) 3硬(额)
					coughDayNum: null, //咳嗽天数
					aggravateDayNum: null, //加重天数
					coughTimesArr: [], //咳嗽时间
					coughRelatedFactor: 0, //咳嗽相关因素0无 1有
					coughFactorDetailArr: [], //咳嗽相关因素详情
					coughVomitStatus: 0, //咳嗽呕吐 0无 1有
					coughAwakeningStatus: 0, //夜里咳醒 0无 1有
					feverCoughStatus: 0, //发热咳嗽 0无 1有
					coughPeculiarityArr: [], //咳嗽特点
					coughRecordedUrl: null, //咳嗽录音 可上床多条 用,隔开
					coughRecordedUrlArr: [], //咳嗽录音数组
					gaspStatus: 0, //喘息 0无 1有
					gaspDayNum: null, //喘息天数
					sneezeStatus: 0, //喷嚏 0无 1有
					sneezeDayNum: null, //喷嚏天数
					nasalObstructionStatus: 0, //鼻塞 0无 1有
					nasalObstructionDayNum: null, //鼻塞天数
					anginaStatus: 0, //咽痛 0无 1有
					anginaDayNum: null, //咽痛天数
					dullStatus: 0, //暗哑 0无 1有
					dullDegree: 1, //暗哑程度 1轻 2中 3重
					gaspBreathVideoUrlArr: [], //喘息或呼吸困难视频示例地址
					electronicStethoscopeUrlArr: [], //电子听诊器呼吸音地址
					kneadNoseEye: 0, //手揉鼻子眼睛 0无 1有
					eczemaStatus: 0, //幼时湿疹 0无 1有
					eczemaDegree: 1, //湿疹程度 1轻 2中 3重
					allergyRhinitis: 0, //过敏性鼻炎 0无 1有
					parentAllergyRhinitis: 0, //父母过敏性鼻炎 0无 1有
					allergySource: 0, //过敏原 0无 1有
					allergySourceDetail: null, //过敏原详情
					penicillinCephalosporinAllergy: 0, //青霉素/头孢过敏史 0无 1有
					otherAllergyMedicineDetail: null, //其他过敏药物
					foodAllergyMedicineDetail: null, //食物过敏详情
					recentRash: 0, //近两天皮疹 0无 1有
					lowerPartRash: 0, //下面部位皮疹 0无 1有
					lowerPartRashDetailArr: [], //下面部位皮疹详情
					rashShowType: null, //皮疹展示 0图片 1视频
					rashShowUrlArr: [], //皮疹展示资源地址
					otherExpression: 0, //有无下列表现 0无 1有
					otherExpressionDetailArr: [], //有下列表现详情
					otherIllness: 1, //其他疾病
					otherIllnessDetail: null, //其他疾病详情
				},
				
				 fileType: null, //0图片 1视频
				 currentTime:null, //当前日期字符串
			}
		},
		
		watch: {	
			"$store.state.form": {
				handler(newVal, oldVal) {
					console.log('改变1',newVal.feverDayNum)
					this.form = newVal
				},
				immediate: true
				// deep: true
			},
			
		},
		beforeDestroy() {
			if (this.AUDIO) {
				this.AUDIO.stop()
			}
		},
		created() {
			this.currentTime = this.getNowFormatDate()
			// #ifndef H5
			//录音开始事件
			this.RECORDER.onStart((e) => {
				console.log('开始录音');
				this.recordBegin(e);
			})
			//录音结束事件
			this.RECORDER.onStop((e) => {
				console.log('结束录音', e.tempFilePath);
				this.uploadVoice(e.tempFilePath)
			})
			
			this.AUDIO.onPlay(()=>{
				console.log('开始播放');
				uni.showLoading({
					title:'播放中',
					mask:true
				})
			})
			this.AUDIO.onEnded(()=>{
				console.log('结束播放');
				uni.hideLoading()
			})
			
			// #endif
			
		},
		
		methods: {
			deleteVoice(index){
				this.form.coughRecordedUrlArr.splice(index,1)
			},
			// 结束录音
			voiceEnd(e) {
				if (!this.recording) {
					return;
				}
				this.recording = false;
				this.voiceTis = '按住 说话';
				this.recordTis = '手指上滑 取消发送'
				this.RECORDER.stop(); //录音结束
			},
			// 录音被打断
			voiceCancel() {
				this.recording = false;
				this.voiceTis = '按住 说话';
				this.recordTis = '手指上滑 取消发送'
				this.willStop = true; //不发送录音
				this.RECORDER.stop(); //录音结束
			},
			// 录音中(判断是否触发上滑取消发送)
			voiceIng(e) {
				if (!this.recording) {
					return;
				}
				let touche = e.touches[0];
				//上滑一个导航栏的高度触发上滑取消发送
				if (this.initPoint.Y - touche.clientY >= uni.upx2px(100)) {
					this.willStop = true;
					this.recordTis = '松开手指 取消发送'
				} else {
					this.willStop = false;
					this.recordTis = '手指上滑 取消发送'
				}
			},
			//录音开始UI效果
			recordBegin(e) {
				this.recording = true;
				this.voiceTis = '松开 结束';
				
			},
			change3(value){
				if(value){
					const reg = /^\d+$/
					if(!reg.test(value)){
						this.form.intervalTimeHour = null
						return uni.showToast({
							icon:'none',
							title:'请输入有效时间间隔'
						})
					} else {
						if(value>24){
							this.form.intervalTimeHour = null
							return uni.showToast({
								icon:'none',
								title:'时间间隔最大24小时'
							})
						}
					}
					
				}
			},
			change2(value){
				if(value){
					if(value<37||value>41){
						this.form.highTemperature = null
						return uni.showToast({
							icon:'none',
							title:'发热温度37-41'
						})
					}
				}
				
			},
			change1(value){
				if(value){
					const reg = /^\d+$/
					if(!reg.test(value)){
						this.form.feverDayNum = null
						return uni.showToast({
							icon:'none',
							title:'请输入有效发热天数'
						})
					} else {
						if(value>30){
							this.form.feverDayNum = null
							return uni.showToast({
								icon:'none',
								title:'发热天数最大30天'
							})
						}
					}
				}
				
				
			},
			getNowFormatDate() {
			  let date = new Date(),
			    year = date.getFullYear(), //获取完整的年份(4位)
			    month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
			    strDate = date.getDate() // 获取当前日(1-31)
			  if (month < 10) month = `0${month}` // 如果月份是个位数，在前面补0
			  if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数，在前面补0
			 
			  return `${year}-${month}-${strDate}`
			},
			open1(url) {
				if(!url||url==null){
					return false
				}
				if(url.includes('mp4')){
					this.videoUrl = url
					this.videoShow = true
				}
				
			},
			videoOpen() {
				console.log('打开了')
			},
			videoClose() {
				this.videoShow = false
				// const videoContext = uni.createVideoContext('myVideo', this)
				// videoContext.pause()
			},
			oversize() {
				uni.showToast({
					icon: 'none',
					title: '视频大小不能超过50MB'
				})
			},

			deletePic(event) {
				if (event.name === '1') {
					this.form.heelExampleUrlArr.splice(event.index, 1)
				}
				if (event.name === '2') {
					this.form.gaspBreathVideoUrlArr.splice(event.index, 1)
				}
				if (event.name === '3') {
					this.form.rashShowUrlArr.splice(event.index, 1)
				}
				if (event.name === '4') {
					this.form.electronicStethoscopeUrlArr.splice(event.index, 1)
				}
			},
			async afterRead(file, lists, name) {
				if (file.name === '3') {
					//限制视频或者图片
					if (!(file.file.type).includes('video') && !(file.file.type).includes('image')) {
						return uni.showToast({
							icon: 'none',
							title: '只能上传视频或图片'
						})
					}
					if ((file.file.type).includes('video')) {
						this.fileType = 1
					} else {
						this.fileType = 0
					}

				}
				uni.showLoading({
					title: '上传中',
					mask:true
				})
				let a = uni.uploadFile({
					url: global.api + '/system/uploadFile', // 仅为示例，非真实的接口地址
					filePath: file.file.url,
					name: 'file',
					header: {
						token: uni.getStorageSync('token')
					},
					success: (res) => {
						let result = JSON.parse(res.data)
						if (result.code === 200) {
							let obj = {}
							obj.url = result.data
							if (file.name === '1') {
								//上传视频
								this.form.heelExampleUrlArr.push(obj)
							} else if(file.name === '2'){
								this.form.gaspBreathVideoUrlArr.push(obj)
							}else if(file.name === '3'){
								this.form.rashShowUrlArr.push(obj)
							}else if(file.name === '4'){
								this.form.electronicStethoscopeUrlArr.push(obj)
							}
							// if (file.name === '2') {
							// 	//喘息或呼吸
							// 	this.form.gaspBreathVideoUrlArr.push(obj)
							// }
							// if (file.name === '3') {
							// 	//上传视频/图片
							// 	this.form.rashShowUrlArr.push(obj)
							// }
							// if (file.name === '4') {
							// 	//电子听诊器呼吸音
							// 	this.form.electronicStethoscopeUrlArr.push(obj)
							// }
							// this.form.heelExampleUrl = result.data

							uni.hideLoading()
						} else {
							uni.hideLoading()
						}
					}
				})
			},
			//保存
			async save() {
				// this.form.clientId = this.clientId
				// this.form.doctorId = this.doctorId
				// if (this.files1.length > 0) {
				// 	this.form.heelExampleUrl = this.files1[0].url
				// }
				// if (this.files2.length > 0) {
				// 	this.form.gaspBreathVideoUrl = this.files2[0].url
				// }
				// if (this.files3.length > 0) {
				// 	this.form.rashShowUrl = this.files3[0].url
				// 	this.form.rashShowType = this.fileType
				// }
				// if (this.files4.length > 0) {
				// 	this.form.electronicStethoscopeUrl = this.files4[0].url
				// }
			
				// console.log(this.info.heelExampleUrlArr)
				// console.log(this.info.gaspBreathVideoUrlArr)
				// console.log(this.info.rashShowUrlArr)
				// console.log(this.info.electronicStethoscopeUrlArr)

				const {
					data
				} = await uni.$http.post('/patient-interrogationRecords/saveClinical', this.form)
				if (data.code === 200) {
					this.$store.commit('setInterrogationInfo',this.form)
					uni.showToast({
						icon: 'none',
						title: data.message
					})
				}
			},
			//选择出生年月日
			changeTime(e) {
				this.form.morbidityTime = e;
			},
			startRecord(e) {
				this.startTIme = Date.now();
				this.initPoint.Y = e.touches[0].clientY;
				this.initPoint.identifier = e.touches[0].identifier;
				this.RECORDER.start({
					format: "mp3"
				}); //录音开始,

			},
			stopRecord() {
				this.RECORDER.stop()
			},
			//下一步
			nextStep(val) {
				this.$emit('nextStep', val)
			},
			//上传录音
			uploadVoice(url) {
				if(!this.willStop){
					uni.showLoading({
						title: '上传中'
					})
					let that = this
					uni.uploadFile({
						url: uni.$http.baseUrl + '/system/uploadFile',
						header: {
							token: uni.getStorageSync('token')
						},
						filePath: url,
						name: 'file',
						success(uploadFileRes) {
							const photores = JSON.parse(uploadFileRes.data);
							if (photores.code === 200) {
								if (that.form.coughRecordedUrlArr) {
									that.form.coughRecordedUrlArr.push(photores.data)
								} else {
									that.form.coughRecordedUrlArr = []
									that.form.coughRecordedUrlArr.push(photores.data)
								}
								uni.hideLoading()
							} else {
								uni.hideLoading()
							}
					
						}
					});
				}
				this.willStop = false;
				
			},
			playVoice(url) {
				console.log(url)
				this.AUDIO.autoplay = true;//设置是否自动播放
				this.AUDIO.src = url
				this.$nextTick(() => {
					this.AUDIO.play()
				})
			}
		}
	}
</script>

<style lang="scss">
	// @import url('@/static/css/components.css');
	@import "@/static/css/style.scss";
	.clinical {
		width: 100%;
		height: 100%;
		overflow: auto;

		.clinical-box {
			width: 100%;
			background-color: #fff;
			border-radius: 20rpx;
			padding: 20rpx;
			box-sizing: border-box;
			margin-bottom: 20rpx;

			.box-header {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-bottom: 20rpx;

				.header-left {
					display: flex;
					align-items: stretch;
					color: #54b6ab;

					.left-line {
						width: 10rpx;
						background-color: #54b6ab;
						margin-right: 10rpx;
					}
				}
				
			}

			.box-form {
				box-sizing: border-box;
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: center;
				margin-bottom: 20rpx;

				.form-left {
					width: 30%;
					display: flex;
					align-items: flex-start;
					justify-content: flex-start;
				}

				.form-right {
					width: 70%;

					/deep/.uni-input-placeholder {
						font-size: 20rpx;
					}

					.right-input-box {
						display: flex;
						align-items: center;

						.input-box-style {
							padding-left: 10rpx;
							width: 80rpx;
							background-color: #f2f2f2;
							border-radius: 10rpx;
							margin: 0 10rpx;
							box-sizing: border-box;
						}
					}

					.video-btn {
						padding: 10rpx 20rpx;
						box-sizing: border-box;
						border: 1rpx solid #54b6ab;
						color: #54b6ab;
						display: flex;
						border-radius: 10rpx;
					}

					.media-text {
						color: #54b6ab;
					}

					.foot-color {
						position: relative;
						width: 49%;
						height: 70rpx;
						background-color: #d9d9d9;
						margin-bottom: 10rpx;
						box-sizing: border-box;
					}

					.text-btn {
						display: flex;
						flex-direction: column;
						align-items: flex-end;
						justify-content: space-between;
						color: #6897ff;
					}

					.footActive {
						border: 2rpx solid #54b6ab;
					}

					/deep/.uni-date__x-input {
						background-color: #f2f2f2;
						padding-left: 10rpx;
						border-radius: 10rpx;
					}

					/deep/.u-checkbox-group--row {
						flex-wrap: wrap;
					}
				}
			}

			.foot-btns {
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: space-around;
			}

			.box-text {
				width: 100%;
				margin-bottom: 20rpx;
			}
		}

		.clinical-tab {
			width: 100%;
			margin-bottom: 20rpx;

			.tab-header {
				display: flex;
				align-items: center;
				justify-content: space-between;
				background-color: #54b6ab;
				color: #fff;
				padding: 20rpx 0;
				box-sizing: border-box;

				.text-box1 {
					display: flex;
					width: 33%;
					align-items: center;
					justify-content: center;
				}

			}
		}



	}
</style>